<template>
	<view class="content">
		<div class="logoDiv">
			<image src="../../static/common/logo.jpg" mode="" class="logo"></image>
		</div>
		<div class="logoMsg">
			<div>为了更好地为您提供服务</div>
			<div>我们将获取您的手机号码</div>
		</div>
		<div class="botton">
			<button type="primary"  class="my-btn2" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">确认授权</button>
		</div>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onLoad(){
			this.$common.removeValue('jump')
		},
		methods: {
			getPhoneNumber(e){
				console.log(e,"e-")
				
				if(e.detail.errMsg == 'getPhoneNumber:ok'){
					// 用户点击了允许
					console.log("点击了允许")
					this.$common.switchTab("/pages/index/index")
					this.$common.getUserInfoUni()
				}else if (e.detail.errMsg == 'getPhoneNumber:fail user deny'){
					// 用户点击了拒绝
					console.log("点击了拒绝")
					this.$common.msg("请确认授权")
				}
				
			}
			
		}
	}
</script>

<style scoped>
	.logoDiv{
		margin: 144rpx 200rpx 84rpx 200rpx;
	}
	.logo{
		width: 360rpx;
		height: 360rpx;
	}
	.logoMsg{
		font-size: 28rpx;
		font-weight: 600;
		color:#333333;
		margin: 0rpx 220rpx;
	}
</style>
